package com.abel.bigwater.dataserver.model.ewide

enum class KmingDataType(val code: Short) {
    TermUploadReq(0x70),
    TermUploadReply(0x80),

    TermSendData(0x71),
    TermSendDataReply(0x81),

    TermBurst(0x82),
    TermHeart(0x83),
    TermShutdownComm(0xf0),

    /**
     * used only in sub-data.
     */
    TermDummy(0x00),

    ReqSpecificData(0x91),
    ReqTermParam(0x92),
    ReqConfigTerm(0x93),

    ReqTermVersion(0x94),
    ReqTermFirmwareNotify(0x95),
    ReqTermFirmwareUpdate(0x96);

    companion object {
        fun findByCode(_code: Short) = KmingDataType.values().find { it.code == _code }
    }
}